package com.schematic.flixel.spaceinvaders
{
import org.flixel.FlxEmitter;
import org.flixel.FlxSprite;

public class Explosion extends FlxEmitter
{
    public function Explosion(x:Number=0, y:Number=0)
    {
        super(x, y);
        delay = 0.5;
        gravity = 0;
        maxRotation = 0;
        setXSpeed(-50, 50);
        setYSpeed(-30, 30);
        setRotation(0, 0);
        
        var particles:int = 20;
        var particle:FlxSprite;
        for (var i:int = 0; i < particles; i++)
        {
            particle = new FlxSprite();
            particle.createGraphic(4,8,0xFFFFFFFF);
            particle.exists = false;
            add(particle);
        }
        start();
    }
}
}